package com.neusoft.elmboot.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.TranDetail;


@Mapper
public interface TranDetailMapper {
	@Insert("insert into trandetail(userId,amount,trandate,trantype) values(#{userId},#{amount},#{trandate},#{trantype})")
	@Options(useGeneratedKeys=true,keyProperty="tranId",keyColumn="tranId")
	 public int saveTranDetail(TranDetail trandetail);
	
	@Select("select * from trandetail where userId=#{userId}")
	public List<TranDetail> listDetailByUserId(String userId);

}
